<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        // 有两⽇期，⽐较两个⽇期是否相同
        var sava1 = prompt('请输入时间');
        var sava2 = prompt('请输入时间')
        if((sava1 = new Date()) == (sava2 = new Date())){
            alert('true')
        }else{
            alert('false');
        }
    </script>
</body>
</html>